package ph.com.gs3.formalistics.model.facades;

import ph.com.gs3.formalistics.model.ldao.UsersLDAO;
import ph.com.gs3.formalistics.model.vo.business.User;
import android.content.Context;

public class UsersDataReader {

	private UsersLDAO usersLDAO;

	public UsersDataReader(Context context) {
		usersLDAO = new UsersLDAO(context);
	}

	public User getActiveUser() {
		User user = null;

		usersLDAO.open();
		user = usersLDAO.getActiveUser();
		usersLDAO.close();

		return user;
	}

	public User getUser(String webId, int companyId) {
		
		User user = null;
		
		usersLDAO.open();
		user = usersLDAO.getUserWithWebAndCompanyId(webId, companyId);
		usersLDAO.close();
		
		return user;
		
	}
	
}
